package com.service;

import com.entity.Book;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookService {
    void insertBook(Book book);
    void deleteBookById(Integer id);
    void updateBook(Book book);
    Book selectBookById(Integer id);
    Book selectBookByName(String name);
    PageInfo<Book> searchBooks(@Param("pageNum")Integer pageNum,
                               @Param("pageSize")Integer pageSize,
                               @Param("value") String value);
    PageInfo<Book> selectPageBook(@Param("pageNum")Integer pageNum,
                                  @Param("pageSize")Integer pageSize,
                                  @Param("query") String query,
                                  @Param("value") String value);
    List<Book> showRecommendBooks();
    List<Book> showHotSellBooks();
    List<Book> showNewBooks();
    List<Book> showNewHot();
    PageInfo<Book> showBooksByCategory(@Param("pageNum")Integer pageNum,
                                       @Param("pageSize")Integer pageSize,
                                       Integer fid,Integer sid);
}
